package file.day9_20.day06;

public class CurrentThreadDemo {
    public static void main(String[] args) {

        Thread main = Thread.currentThread();//获取执行main方法的线程（主线程）
        System.out.println("线程"+main);

        dosome();//主线程执行dosome方法
    }
    public static void dosome(){
        Thread t = Thread.currentThread();//获取执行dosome方法的线程
        System.out.println("执行dosome方法的线程是："+t);
    }
}
